{% extends 'layout.html' %}

{% block content %}
    <div class="container">
        <div style="margin-bottom: 10px">
            <a class="btn btn-success" href="/user/hisback/" name = "key_1">
                <span class="glyphicon glyphicon-plus-sign" aria-hidden="true" ></span>
                时间倒叙(1)
            </a>

            <a class="btn btn-success" href="/user/list/" name="selec_return_8">
                <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>
                返回主页面(回退)
            </a>
            {% comment %} <a class="btn btn-danger" href="/user/del/" name = "selec_return_8">
                <span class="glyphicon glyphicon-plus-sign" aria-hidden="true" ></span>
                删除最后一个用户(回退)
            </a>
            <a class="btn btn-danger" href="/user/change/" name = "click_kongge">
                <span class="glyphicon glyphicon-plus-sign" aria-hidden="true" ></span>
                修改用户信息(空格)(最后一个用户)
            </a>

            <a class="btn btn-success" href="/user/his/" name = "key_1">
                <span class="glyphicon glyphicon-plus-sign" aria-hidden="true" ></span>
                查询历史(按键1)
            </a> {% endcomment %}

        </div>
        <div class="panel panel-default">
            <!-- Default panel contents -->
            <div class="panel-heading">
                <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
                用户列表
            </div>

            <!-- Table -->
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>操作id</th>
                    <th>操作编码</th>
                    <th>操作解释</th>
                    <th>操作时间</th>
                    <th>指定id查询</th>
                    <th>操作类型查询</th>
                    {% comment %} <th>入职时间</th>
                    <th>性别</th>
                    <th>所属部门</th>
                    <th>操作</th> {% endcomment %}
                </tr>
                </thead>
                <tbody>
                {% for obj in queryset %}
                    <tr>
  
                        <th>{{ obj.id }}</th>
                        <td>{{ obj.id_did }}</td>
                        <td>{{ obj.did_his_key }}</td>
                        <td>{{ obj.trance_text }}</td>
                        <td>{{ obj.Time_sta }}</td>
                        <td>
                           <a class="btn btn-primary btn-xs" href="/user/hiskey/{{ obj.id_did }}">id查询</a>
                       </td> 
                        
                        <td>
                               <a class="btn btn-primary btn-xs" href="/user/histype/{{ obj.did_his_key }}">操作类型</a>
                         </td> 
                        {% comment %} <td>{{ obj.create_time|date:"Y-m-d" }}</td>
                        <td>{{ obj.get_gender_display }}</td>
                        <td>{{ obj.depart.title }}</td> {% endcomment %}
                        {% comment %} <td>
                            <a class="btn btn-primary btn-xs" href="/user/change/{{ obj.id }}">编辑</a>
                            <a class="btn btn-danger btn-xs" href="/user/del/{{ obj.id }}">删除</a>
                        </td> {% endcomment %}
                    </tr>
                {% endfor %}

                </tbody>
            </table>
        </div>
    </div>
{% endblock %}
